"""
@File  :app_info.py
@Author:王世锋
@Date  :2023/7/1515:29
@Desc  :
"""
import hashlib

def create_sign(pay_data, mch_key):
    """
    data sign
    :param mch_key:
    :param pay_data:
    :return:
    """
    from urllib.parse import urlencode
    npay_data = {}
    for k in sorted(pay_data):
        npay_data[k] = pay_data[k]
    params = urlencode(npay_data)
    print(params)
    stringSignTemp = "{}{}".format(params, mch_key)
    print("stringSignTemp==", stringSignTemp)
    sign = hashlib.sha512(stringSignTemp.encode('utf-8')).hexdigest()
    return sign

api_host = "https://api.bestwond.com" # Develop Test Host

# api_host = "https://api.bestwond.com"
app_id = "bw_de2767d821f911e"
app_secret = "de27690e21f911eda66200163e198b20"
device_number = "2100013075"
"""
以上数值，请在生成环境换成正式的
"""